
import {simpleServer} from '@/tools/servers'

/**
 * 订单条目
 */
export class OrderItemService {
    // 分页查询列表
    static findOrderItems (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findOrderItems,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/findOrderItems', body);
    }


    //根据订单条目Id查询订单条目
    static findOrderItem (orderItemId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findOrderItem ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/findOrderItem',body);
    }

    //为了编辑,根据订单条目Id查询订单条目
    static findOrderItemForEdit(orderItemId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findOrderItemForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/findOrderItemForEdit',body);
    }

    //为了查看,根据订单条目Id查询订单条目，所有外键字段的名称都已加载
    static findOrderItemForView(orderItemId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findOrderItemForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/findOrderItemForView',body);
    }

    //创建新的订单条目
    static createOrderItem() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createOrderItem,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/createOrderItem',body);
    }

    //保存订单条目
    static saveOrderItem(orderItem) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveOrderItem,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/saveOrderItem', body);
    }

    //编辑订单条目
    static updateOrderItem (orderItem) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateOrderItem,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/updateOrderItem', body);
    }

    //根据订单条目Id删除订单条目
    static deleteOrderItem (orderItemId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteOrderItem,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/deleteOrderItem',body);
    }

    //为了查看,根据订单条目Id查询订单条目，只加载ID 和 名称
    static findOrderItemsWithIdNameById(orderItemId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findOrderItemsWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/findOrderItemsWithIdNameById',body);
    }

    //为了查看,根据订单条目 名称 查询订单条目，只加载ID 和 名称
    static findOrderItemsWithIdNameByName(orderItemName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findOrderItemsWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/order/OrderItem/findOrderItemsWithIdNameByName',body);
    }


}
